package com.awesome.spring.kafka.kafka;

/**
 * @program: awesome-spring
 * @description:
 * @author: Alex Wu
 * @createDate: 2025-03-19 11:39
 **/
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@Service
public class KafkaConsumer {

    // 监听 Kafka 主题
    @KafkaListener(topics = "test", groupId = "my-group")
    public void listen(String message) {
        System.out.println("Received Message: " + message);
    }
}
